<?php

namespace app\api\model\project;

use think\Model;


class ProjectApply extends Model
{





    // 表名
    protected $name = 'project_apply';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'integer';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
        'status_text'
    ];


    public function getStatusList()
    {
        return ['0' => __('审核中'), '1' => __('服务中'), '2' => __('已暂停'), '3' => __('已删除'), '4' => __('审核拒绝')];
    }

    public function getStatusTextAttr($value, $data)
    {
        $value = $value ? $value : $data['status'];
        $list = $this->getStatusList();
        return $list[$value] ?? '';
    }






}
